#ifndef INCLUDED_GLX_H
#define INCLUDED_GLX_H

#include <X11/Xlib.h>
#include <X11/Xutil.h>

/*
 * Supported GLX functions:
 *

  glXChooseVisual
  glXCreateContext
  glXDestroyContext
  glXGetClientString
  glXGetConfig
  glXIsDirect
  glXMakeCurrent
  glXQueryExtension
  glXQueryExtensionsString
  glXQueryServerString
  glXQueryVersion
  glXSwapBuffers

*/

#ifdef __cplusplus
extern "C" {
#endif

/*
** GLX resources.
*/

typedef XID GLXContextID;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
typedef XID GLXPbuffer;
typedef XID GLXWindow;
typedef XID GLXFBConfigID;
typedef struct __GLXcontextRec *GLXContext;
typedef struct __GLXFBConfigRec *GLXFBConfig;


/*
 * Supported glX functions:
 */

extern XVisualInfo* (*glXChooseVisual) (Display *dpy, int screen, int *attribList);
extern GLXContext (*glXCreateContext) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
extern void (*glXDestroyContext) (Display *dpy, GLXContext ctx);
extern const char * (*glXGetClientString) (Display *dpy, int name );
extern int (*glXGetConfig) (Display *dpy, XVisualInfo *vis, int attrib, int *value);
extern Bool (*glXIsDirect) (Display *dpy, GLXContext ctx);
extern Bool (*glXMakeCurrent) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
extern Bool (*glXQueryExtension) (Display *dpy, int *errorBase, int *eventBase);
extern Bool (*glXQueryVersion) (Display *dpy, int *major, int *minor);
extern const char * (*glXQueryServerString) (Display *dpy, int screen, int name );
extern const char * (*glXQueryExtensionsString) (Display *dpy, int screen );
extern void (*glXSwapBuffers) (Display *dpy, GLXDrawable drawable);



/* Initialize function pointers */
void dogonInitGLX(void);


#ifdef __cplusplus
}
#endif

#endif /* INCLUDED_GLX_H */
